<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>1-queryselector</title>
    <style>
        /* .biao {

        }
        ul {

        }
        li {

        } */
    </style>
</head>
<body>
    <ul class="biao">
        <li>1</li>
        <li>2</li>
        <li>3</li>
    </ul>

    <script>
        // 拿到 标签 拿到CSS
        // querySelector 能拿到一个元素(第一个)
        let res = document.querySelector('.biao')
        let res1 = document.querySelector('li')
        // console.log(res)
        // console.log(res1)
        // console.log(typeof res)  // object
        

        // 返回一个伪数组 能拿到多个 标签
        let liAll = document.querySelectorAll('li')
        console.log(liAll)

        // 如果获取不到返回NUll
        let p = document.querySelector('p')
        // console.log(p)
        
        
        
    </script>
</body>
</html>